/**
 * Created by doveaz on 2017/4/3.
 */
axios.defaults.baseURL = 'http://47.93.24.39:8088/v1/';
axios.defaults.withCredentials=true;
axios.activity=function (url,obj) {
    if(typeof obj==="undefined")obj="";
    url=url[0]==='/'?url:'/'+url;
    return axios.post('/activity'+url+'?'+$.param(obj))
};
axios.advice=function (url,obj) {
    if(typeof obj==="undefined")obj="";
    url=url[0]==='/'?url:'/'+url;
    return axios.post('/advice'+url+'?'+$.param(obj))
};
axios.article=function (url,obj) {
    if(typeof obj==="undefined")obj="";
    url=url[0]==='/'?url:'/'+url;
    return axios.post('/article'+url+'?'+$.param(obj))
};
axios.student=function (url,obj) {
    if(typeof obj==="undefined")obj="";
    url=url[0]==='/'?url:'/'+url;
    return axios.post('/student'+url+'?'+$.param(obj))
};
axios.topten=function (url,obj) {
    if(typeof obj==="undefined")obj="";
    url=url[0]==='/'?url:'/'+url;
    return axios.post('/topten'+url+'?'+$.param(obj))
};
axios.home=function (url,obj) {
    if(typeof obj==="undefined")obj="";
    url=url[0]==='/'?url:'/'+url;
    return axios.post('/home'+url+'?'+$.param(obj))
};